refactor(harness): share project roots [Agent Map 01/15] - #819
Conversation
Review — PR #819 (round 1)1. Studio-derived workspace scopes are published with keys the graph resolver cannot resolve
The new roots are not an edge case — they are the headline of this PR:
Before this change the input to 2. Tightened root uniqueness bricks an existing Windows catalog — no migration
Root-binding uniqueness moved from byte-exact 3. No changeset for behavior changes in a published package
4. The new server wiring has no testThe 121 new lines in 5. Internal prose now ships in the npm tarball
These comment blocks moved from Verdict: Request changes — §1 is a live correctness regression in the path this PR exists to unify, and §2 has no recovery once it fires. |
Review — PR #819 (round 2, follow-up)Delta reviewed: New finding1. The scope merge is keyed by
|
34177a9 to
a2c8d7f
Compare
Primary change type
Problem and motivation
Studio used different path and project-root rules on the server and in the browser. A descendant session or a different spelling of a root could acquire a different project identity or sidebar group.
Summary and scope
Extract shared path comparison and deterministic project-root selection, then use it in the Studio catalog, server root discovery, and browser project tree. Existing durable project roots remain authoritative across descendants, multiple roots, and restart.
Canonicalize Windows and symlink aliases before catalog deduplication, retaining the existing durable project ID and metadata. Graph lookup and descendant-session resolution use the same root identity.
How this increment fits
Shared path identity and catalog migration are usable on their own. Session capability changes begin in part 2.
Stack and review boundary
a2c8d7f6f3612e36373c5e0cc486a2601ba9d3aa; 1,941 changed lines across 12 files, counting additions and deletions including tests.fix/studio-onboarding-followups.Related work
Agent Map checkpoint SAP-3147; relevant work SAP-3148. This packaging follows the maintainer-approved 15-PR split.
Validation
Fresh local checks against
a2c8d7f6f3612e36373c5e0cc486a2601ba9d3aa:Tests and documentation
Regression coverage: Windows drive and UNC aliases, real and symlink roots, recent-directory eviction, descendant sessions, graph lookup, and durable identity after restart.
See part 15 for integrated browser, native CLI, and Mac journey validation. The checks above were run independently on this PR’s own commit.
Linux tests run with ordinary user filesystem permissions; the sandbox's extra ambient capabilities are dropped. Hosted CI and automated review are separate from these recorded local results.
Compatibility and release impact
.changeset/durable-project-root-compatibility.mdSecurity
AI assistance
Checklist